<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
    *{margin: 0;padding: 0;}
    #box{
        width: 300px;
        height: 300px;
        background: rgb(185, 138, 236);
        margin-left: 100px;
    }
    #dv1{
        width: 100px;
        height: 100px;
        background: rgb(240, 220, 141);
        margin-left: 50px;
    }
    </style>
</head>
<body>
<div id="box">
    <div id="dv1"></div>
</div>
<script src="js/jquery-3.6.0.min.js"></script>
<script>
$(function(){
    console.log( $("#dv1").offset()); 
    console.log( $("#dv1").offset().left);  
    console.log( $("#dv1").position().left);  

  
})
</script>
</body>
</html>